package com.suyl.candy.tools;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author suyanlong
 * @version 1.0
 * @createDate 2020/5/17 19:25
 */
@RestController
@RequestMapping("properties")
public class PropertiesController {

    @GetMapping("key")
    public String getKey(String key) {
        long start = System.currentTimeMillis();
        String value = PropertiesServer.maps.get(key);
        System.out.println(System.currentTimeMillis() - start);
        return value;
    }
}
